<div id="taskList">
<center><h3>Tasks</h3></center>
<ul id="taskNav">
  <li><%= link_to '(new)', new_task_path %></li>
  <% Task.find(:all, :order => "priority DESC").each do |task| %>
    <li>
      <span class="<%= getTaskPriority(task) %>">
        <%= link_to task.description, edit_task_path(task) %>
      </span>
      <% if controller.controller_name.downcase.eql?("home") %>
      <ul>
        <li><%= link_to "mark completed", task, :confirm => 'Are you sure?', :method => :delete %>
        <% if !task.event.nil? %><li><%= link_to task.event.title, {:id => task.event.id, :controller=> :events, :action => :show} %></li><% end %>
      </ul>
    </li>
    <% end %>
  <% end %>
</ul>
</div>
